import request from '@/utils/request'

// 查询违法类型列表
export function listViolationType(query) {
  return request({
    url: '/basicInformation/violationType/list',
    method: 'get',
    params: query
  })
}

// 查询违法类型详细
export function getViolationType(id) {
  return request({
    url: '/basicInformation/violationType/' + id,
    method: 'get'
  })
}

// 新增违法类型
export function addViolationType(data) {
  return request({
    url: '/basicInformation/violationType',
    method: 'post',
    data: data
  })
}

// 修改违法类型
export function updateViolationType(data) {
  return request({
    url: '/basicInformation/violationType',
    method: 'put',
    data: data
  })
}

// 删除违法类型
export function delViolationType(id) {
  return request({
    url: '/basicInformation/violationType/' + id,
    method: 'delete'
  })
}

// 导出违法类型
export function exportViolationType(query) {
  return request({
    url: '/basicInformation/violationType/export',
    method: 'get',
    params: query
  })
}

// 查询部门下拉树结构
export function treeselect() {
  return request({
    url: '/basicInformation/violationType/treeselect',
    method: 'get'
  })
}
